<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang.cp_home}{if $ur_here} - {$ur_here}{/if}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
{literal}
<style type="text/css">
body {
  color: white;
}
</style>
{/literal}
{insert_scripts files="../js/utils.js,validator.js"}
<script language="JavaScript">
<!--
// 这里把JS用到的所有语言都赋值到这里
{foreach from=$lang.js_languages key=key item=item}
var {$key} = "{$item}";
{/foreach}
{literal}
if (window.parent != window)
{
  window.top.location.href = location.href;
}
{/literal}
//-->
</script>
</head>
<body style="background: #3f6996">
<div class="ec_loginBox">
    <img src="images/login_img.png" class="ec_img" />
	<div class="ec_logincon">
    	<form method="post" action="privilege.php" name='theForm' onsubmit="return validate()">
    	<div class="ec_checkBox">
        	<label>{$lang.label_username}</label>
            <input type="text" class="ip1" name="username" />
        </div>
        <div class="ec_checkBox">
        	<label>{$lang.label_password}</label>
            <input type="password" class="ip1" name="password"  />
        </div>
        {if $gd_version > 0}
        <div class="ec_checkBox">
        	<label>{$lang.label_captcha}</label>
            <input type="text" class="ip2" name="captcha" />
            <a href="javascript:void(0)"><img src="index.php?act=captcha&{$random}" width="150" height="27"  onclick= this.src="index.php?act=captcha&"+Math.random() /></a>
        </div>
        {/if}
        <div class="ec_checkBox" style="padding-left:23px;">
            <label for="remember">
            <input type="checkbox" class="ip3" value="1" name="remember" id="remember" />
            {$lang.remember}
            </label>
        </div>
        <div class="ec_checkBox">
            <input type="submit" class="ip4" value="{$lang.signin_now}"/>
        </div>
        <div class="ec_checkBox">
            <a href="../" class="shouye" title="{$lang.back_home}">{$lang.back_home}</a>
            <a href="get_password.php?act=forget_pwd" class="forget" title="{$lang.forget_pwd}">{$lang.forget_pwd}</a>
        </div>
        <input type="hidden" name="act" value="signin" />
        </form>
    </div>
</div>

<script language="JavaScript">
<!--
  document.forms['theForm'].elements['username'].focus();
  {literal}
  /**
   * 检查表单输入的内容
   */
  function validate()
  {
    var validator = new Validator('theForm');
    validator.required('username', user_name_empty);
    //validator.required('password', password_empty);
    if (document.forms['theForm'].elements['captcha'])
    {
      validator.required('captcha', captcha_empty);
    }
    return validator.passed();
  }
  {/literal}
//-->
</script>
</body>